home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 255_01 / gpshad1.asm < prev    next >
Encoding:
Assembly Source File  |  1988-03-28  |  1.5 KB  |  70 lines

  1.           page   80,132
  2.           page
  3. ;
  4. ;         Kent Cedola
  5. ;         2015 Meadow Lake Court
  6. ;         Norfolk, Virginia  23518
  7. ;
  8.  
  9. dgroup    group  _data
  10.  
  11. _data     segment word public 'data'
  12.           assume ds:dgroup
  13.  
  14.           extrn  _gdgseg:word,_gdgsadr:word,_gdshad1:byte
  15.           extrn  _gdc_flg:byte,_gds_flg:byte,_gdw_flg:byte
  16.  
  17. _data     ends
  18.  
  19. _text     segment byte public 'code'
  20.  
  21.           assume cs:_text,ds:dgroup
  22.           public _gpshad1
  23. _gpshad1  proc   near
  24.  
  25.           push   bp
  26.           mov    bp,sp
  27.           push   si
  28.           push   di
  29.  
  30.           mov    _GDS_FLG,-1           ; Turn line style & shading on
  31.  
  32.           mov    dx,03CEh
  33.           mov    ax,0205h
  34.           out    dx,ax
  35.           mov    al,08h
  36.           out    dx,al
  37.           inc    dx
  38.  
  39.           mov    es,_GDGSEG
  40.           lea    si,_GDSHAD1           ; Address of the new shade matrix
  41.           inc    si
  42.           inc    si
  43.           mov    di,_GDGSADR
  44.           MOV    CX,64
  45.           MOV    AL,080h
  46. fbyte01:
  47.           OUT    DX,AL
  48.           MOV    AH,ES:[DI]
  49.           MOV    AH,[SI]
  50.           MOV    ES:[DI],AH
  51.           ROR    AL,1
  52.           ADC    DI,0
  53.           INC    SI
  54.           LOOP   fbyte01
  55.  
  56.           mov    al,0FFh
  57.           out    dx,al
  58.           dec    dx
  59.           mov    ax,0005h
  60.           out    dx,ax
  61.  
  62.           pop    di
  63.           pop    si
  64.           pop    bp
  65.           ret
  66. _gpshad1  endp
  67.  
  68. _text     ends
  69.           end
  70.